I have a file with such list:
100
101
102
103
What I want to do is to replace every 0 into A, 1 into C, 2 into G, 3 into T.
Hence we hope to get
CAA
CAC
CAG
CAT
I have a model 'listing' with a field 'created' which is in a datetime format.
I need to list in a view all listings that were created over 2 weeks ago.
An extra thing if possible is to somehow mark them as expired.
This is in cakePhp 1.27
I found the following C++ code (comments added myself):
// frame_name is a char array
// prefix is std::string
// k is a for loop counter
// frames is a std::vector string
sprintf(frameName, "%s_%0*s.bmp", prefix.c_str(), k, frames[k].c_str());
I then try to translate it to C#
// prefix is string
// k is a for loop counter
// frames is List<string>
string frameName = string.Format("{0}_(what goes in here?).bmp", prefix, k, frames[k]);
Basically, what would be the C# equivalent of the C++ format string "%s_%0*s.bmp"?
I have an Excel spreadsheet containing a list of strings. Each string is made up of several words, but the number of words in each string is different.
Using built in Excel functions (no VBA), is there a way to isolate the last word in each string?
Examples:
Are you classified as human? - human?
Negative, I am a meat popsicle - popsicle
Aziz! Light! - Light!
I've got a problem with the removal of entities in my JPA application: basically, I do in this EJB Business method:
load photo list ;
for each photo {
//UPDATE
remove TagPhoto element from @OneToMany relation
//DISPLAY
create query involving TagPhoto
...
}
and this last query always throws an EntityNotFoundException (deleted entity passed to persist: [...TagPhoto#])
I think I understand the meaning of this exception, like a synchronization problem caused by my Remove, but how can I get rid of it?
I have a requirement to build an extensible wizard in a portlet. This wizard will list components that are installed and forward the user to a sub-wizard that is component specific.
The requirement is that the components are to be developed by other people and dynamically plugged into this wizard (Jetspeed reboot is okay). I would like to be able to define the components as portlets themselves who's content is rendered into the primary portlet.
Has anybody ever done something like this?
So I have a model with a FileField for excel spreadsheet. What I need to do this add another column in this spreadsheet, in each row let user pick from a drop-down list then save it and display it in html. All the picking and uploading will happen through the admin interface. So I have figured out way how to display a spreadsheet in html, however I have no idea how to write this save method. I could really use some hints and tips..
Hi,
I have the following LINQ example:
var colorDistribution =
from product in ctx.Products
group product by product.Color
into productColors
select
new
{
Color = productColors.Key,
Count = productColors.Count()
};
All this works and makes perfect sense.
What I'm trying to achieve is to group by into a strong type instead of anonymous type.
For example I have a ProductColour class and I would like to Group into a List<ProductColour>
Is this possible?
Thank you
Hello !
Is it possible in Netbeans to specify a list of directories that it should scan for tasks (@todo) ?
I want to be able to exclude some subdirectories from my project - for example /lib/Zend - and only allow to scan
/lib/Cms
/config
/app
...
Is it possible to do this ?
I noticed that PHP seems to return only values of checked checkboxes. I would like to see a list of checkboxes, not just values of checked checkboxes. Is there a way to detect variables of unchecked boxes?
I asked because I want to be able to update settings. For example, I have a few options that are already checked but if an user decides to uncheck an option, I need to know that unchecked value so I can update the option to be disabled.
I want to create asp.net 4.0 dynamic pages loaded from my MS SQL server. Basically, its a list of locations with informations. For example:
Location1 would have the page www.site.com/location/location1.aspx
Location44 would have the page www.site.com/location/location44.aspx
I dont even know where to start with this, url writting maybe?
Hello all,
I have a Document Library that receives a mail every week. I want to show the list of mails with their summaries. Is it possible to get that mail's content in Sharepoint, without deploying a custom code?
Thanks.
Hello to all,
what is the maximum value of data type INTEGER in sqlite3 ?
How do you store ip address in database ?
What is attached ?
How to create table which belongs to a specific database using sql ddl?
What is this error about ?
error while the list of system
catalogue : no such table: temp.sqlite_master
Unable to execute statement
Does sqlite3 text data type supoports unicode?
Thanks.
I have this strange behavior. Im Loading some entities in a List< and append to a grid.
When double click the grid i take the row cast to the entity and append to a property.
I have changed some things in my database and code and now i get this exception while i never wanted to check something on this Entity Reference.
Any Ideas?
I have a huge set of .vcproj files (~200) stored in different locations. I have a list of these files with full paths.
How can i automatically add them to the solution file(.sln) ?
UPD: I'm looking for existing tool/method.
Hi, I was wondering if anyone knew where I could find a list of LineDisplays, CashDrawers, Printers, that work well with POS for .NET. I want to get around creating my own service objects for potential devices that I might by which are not supported. Thanks.
Hello everyone,
I have trouble understanding how to avoid the n+1 select in jpa or hibernate.
From what i read, there's the 'left join fetch', but i'm not sure if it still works with more than one list (oneToMany)..
Could someone explain it to me, or give me a link with a clear complete explanation please ?
I'm sorry if this is a noob question, but i can't find a real clear article or doc on this issue.
Thanks
The problem is as follows: A wanderer begins on the grid coordinates (x,y) and wants to reach the coordinates (0,0). From every gridpoint, the wanderer can go 8 steps north OR 3 steps south OR 5 steps east OR 6 steps west (8N/3S/5E/6W).
How can I find the shortest route from (X,Y) to (0,0) using breadth-first search?
Clarifications:
Unlimited grid
Negative coordinates are allowed
A queue (linked list or array) must be used
No obstacles present
As the title says, I'm trying to use a class declared in a namespace which contains "base" in its name.
Think of a situation like the following:
open Foo.base.Bar
In C# I'd just use @ before base but F# seems to ignore that and to think that @ is the infix operator used for list concatenation.
Since the namespace belongs to a third-party library which I cannot modify, is there a way I can still access it from F#?
I'm trying to figure out the technicalities of scheduling in Linux. What I can't figure out is what happens with those entries in the run_queue where there are no running processes.
In the run_queue we have a bitmap, a counter, and the array of lists themselves. For a list that is empty because there are no running tasks with its priority, what do the next and prev pointers point to?
This shows how to have a static variable inside an object or context:
http://www.mail-archive.com/[email protected]/msg04764.html
But the scope is too large for some needs, is it possible to have a static variable inside an object function ?
In the same vein as http://stackoverflow.com/questions/2593399/process-a-set-of-files-from-a-source-directory-to-a-destination-directory-in-pyth I'm wondering if it is possible to create a function that when given a web directory it will list out the files in said directory. Something like...
files[]
for file in urllib.listdir(dir):
if file.isdir:
# handle this as directory
else:
# handle as file
I assume I would need to use the urllib library, but there doesn't seem to be an easy way of doing this, that I've seen at least.
I need inspiration and motivation so I'm trying to find examples of different programs that have interesting and attractive UI's created free using wxPython.
My searches have been slow to find results. I'm hoping you guys know of some of the best ones out there.
btw, I've seen these:
http://www.wxpython.org/screenshots.php
and the list under "Applications Developed with wxPython" on the wxPython Wikipedia page.
Update: only need Windows examples
Hello,
There is already a similar question(link).The thing is I don't understand what unit I have to delete.
I have installed the latest JCL library and added 'JclCompression' to the uses list in a unit and I get the error: "Unit JclCompression was compiled with a different version of sevenzip.IOutArchive".
Please explain to me in a simpler way how to resolve the problem.
Thanks in advance!
When creating a flex Chart, the list of colors is always the same, something like (orange, green, blue, ... ) I imagine that the Flex Charts use any array of default colors, Is there a way to get this array ?