I am working on an ASP.NET MVC based CMS that presents a rather extreme case. The system must allow the user to add custom content types based on different fields, and for every field, one can add options and validations. The thing is that everything is stored in a complex DB and extracted at runtime using LINQ.
I am pretty fresh with ASPNET MVC so the following dilemma came to mind
How should I make the content creation view so that form helpers are not predefined int he view code but are loaded based on the type of the field ? Do I have to create a factory class that checks the value of the type property of the field, and then returns a helper based on that or there's a better way to do it. This one seems pretty rigid to me , because anytime I make a change in the Fieldtypes table, I will have to make sure to create a check for that new type too.
Last summer I set up Change Data Capture for a client to track changes to their application database to apply those changes to their data warehouse. The client had some issues a short while back and felt they needed to increase the retention period from the default 3 days to 5 days. I ran this query to make that change: sp_cdc_change_job @job_type='cleanup', @retention=7200 The value 7200 represents the number of minutes in a period of 5 days. All was well, but they recently asked how they can verify...(read more)
Hi,
I wrote a research paper in latex and generated pdf using kile. It worked perfectly well. Now conference people are asking for dvi file also. But Kile's quick build process does not give a dvi file, but its 'Latex' compile process does. So I tried to compile the document, and it gave errors for includegraphics saying figure not found. When I append the correct extensions to the image names, that errors stopped coming but new errors came "bounding box is missing". I added bounding box values and now DVI file is being generated. My questions are: I have tried giving very high and low bounding box values but there is no deformation in the PDF. Why? Can I generate a DVI without giving bounding box values?
Thanks and regards,
Akshey
Oracle's Master Data Management suite has seen remarkable development progress in the past year and a half. Leveraging out-of-the-box integration to applications provided by Application Integration Architecture, the cost, risk and time it takes to implement an MDM solution has been cut in half. Oracle Applications are now 'MDM Aware', Data Quality tools have reached state-of-the-art status, and new hubs are coming on line. In this AppsCast, Pascal Laik, VP MDM Products discusses this progress, what it means for Oracle customers, and where we are going from here.
Am using Zend framework and PHP
Am going to generate a PDF using Zend .
So the View is PDF.There is no PHTML.
But if i dont use PHTML in view , is it a perfect MVC?
if i want to be a perfect MVC shall i do the db retrieval and variable declaration and assigning in controller and use view and use all pdf functions in view phtml file will it make a perfect MVC?
What is the advantage of MVC in this case? :-)
can i do the include of zend pdf in phtml file or controller php file? what is the difference ?
I am looking for some well known algorithms that can be considered while handling very large amount of data.(Edit- By large amount of data I refer to records in a database excluding blobs). These algorithms if not in totality but in parts may be used in big web applications like Twitter, Last.fm , Amazon ,etc.
Specifically, I'm looking for names or links to such algorithms. My primary interest lies in developing a very deep understanding on working with large database records and writing efficient code for working with the same.
I'm generating models from my Mysql db. It generates a foreign key collection properly, but not the other way around... Is this supposed to be 'by-design', or am i doing something wrong?
pseudo code alert
User:
UserId pk
LocationId fk //User location
Location
LocationId pk
UserId fk //Location owner
Generated code:
class User() {
hasMany('Location') //for locations owned by the user
//BUT NOT THIS ONE:
//hasOne('Location_1') //for current location of user
}
class Location() {
hasMany('User') //for users which are on that location
//AND NOT THIS ONE
//hasOne('User_1') //for location owner
}
I'm creating an application that generates purchase order.
I'm able to create text file from the details entered by user.
I would like to generate an Excel which looks much better than a normal text file.
Is there any open source library that I can use in my application?
I had this weird idea for an encryption that I wanted to try out, it may be bad, and it may have done before, but I'm just doing it for fun. The short version of the question is: Is it possible to generate a long, deterministic and non-uniformly distributed string/sequence of numbers from a small seed?
Long(er) version: I was thinking to encrypt a text by changing encoding. The new encoding would be generated via Huffman algorithm. To work well, the Huffman algorithm would need a fairly long text with non uniform distribution. Then characters can have different bit-lengths which would be the primary strength of this encryption. The problem is that its impractical to enter in/remember a long text each time you want to decrypt the text. So I was wondering if it was possible to generate a text from password seed?
It doesn't matter what the text is, as long as it has non uniform distribution of characters and that the exact same sequence can be recreated each time you give it the same seed. Preferably, are there any functions/extensions in Python that can do this?
EDIT:
To expand on the "strength" of varying bit length:
if I have a string "test", ASCII values 116, 101, 115, 116, which gives bit values of
1110100 1100101 1110011 1110100
Then, say my Huffman algorithm generates encoding like
t = 101
e = 1100111
s = 10001
The final string is
101 1100111 10001 101, if we encode this back to ASCII, we get
1011100 1111000 1101000, which is 3 entirely different characters. Obviously its impossible to perform any kind of frequency analysis or something like that on this.
Choosing a long term data storage medium isn';t as easy as you may think. You might imagine that the data could be burnt to CD, locked in a cupboard and that it would last forever however unfortunatel... [Author: Chris Holgate - Computers and Internet - April 02, 2010]
If you've flipped on
the POCO (Plain Ol' CLR Objects) code generation T4 templates for Entity
Framework to enable testing or just 'cuz you like the code better, you might
find that you lack the ability to expose that same model via Data Services as
OData (Open Data). If you surf to the feed,
you'll likely see something like this:
The XML page cannot be displayed
Cannot view XML input using XSL style
sheet. Please correct the error and then click the
Refresh button, or
try again later....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
Hi,
In Ror or Django or web2py you can "describe" a database (as a set of classes that remaps to tables) and the framework (having being provided with a connection string to the desired database) generates the tables, fields, relations and in the case of RoR and web2py it also keeps it up-to-date (eg, removing a class drops the table, adding a property to the class triggers an "alter table add" etc).
Is there any perl module that does the same? Eg, it takes the YAML / XML / JSON description of a database as input and modifies / generates the database accordingly?
Thanks in advance.
In my last question i asked how to best send a string from one view controller to another, both which were on a navigation stack:
http://stackoverflow.com/questions/2898860/pass-string-from-tableviewcontroller-to-viewcontroller-in-navigation-stack
However I just realised I can either pass the path to the file in the app's document's folder as the first (the table view) has already accessed the data in the file should I pass viewcontroller the data to the pushed VC?
Hi,
I'm trying to dynamically create buttons at runtime with PyQT4.7
However, this being my first python program I'm not sure how to get the functionality I want.
I would like to be able to substitute a text string for an attribute name:
i.e.
for each in xrange(4):
myname = "tab1_button%s" % each #tab1_button0, tab1_button1, tab1_button2
#self.ui.tab1_button0 = QtGui.QPushButton(self.ui.tab) <--normal code to create a named button
setattr(self.ui,myname,QtGui.QPushButton(self.ui.tab)) #rewrite of line above to dynamicly generate a button
#here's where I get stuck. this code isn't valid, but it shows what i want to do
self.ui.gridLayout.addWidget(self.ui.%s) % myname
#I need to have %s be tab1_button1, tab1_button2, etc. I know the % is for string substituion but how can I substitute the dynamically generated attribute name into that statement?
I assume there's a basica language construct I'm missing that allows this. Since it's my first program, please take it easy on me ;)
I have a security number generator device, small enough to go on a key-ring, which has a six digit LCD display and a button. After I have entered my account name and password on an online form, I press the button on the security device and enter the security code number which is displayed.
I get a different number every time I press the button and the number generator has a serial number on the back which I had to input during the account set-up procedure.
I would like to incorporate similar functionality in my website. As far as I understand, these are the main components:
Generate a unique N digit aplha-numeric sequence during registration and assign to user (permanently)
Allow user to generate an N (or M?) digit aplha-numeric sequence remotely
For now, I dont care about the hardware side, I am only interested in knowing how I may choose a suitable algorithm that will allow the user to generate an N (or M?) long aplha-numeric sequence - presumably, using his unique ID as a seed
Identify the user from the number generated in step 2 (which decryption method is the most robust to do this?)
I have the following questions:
Have I identified all the steps required in such an authentication system?, if not please point out what I have missed and why it is important
What are the most robust encryption/decryption algorithms I can use for steps 1 through 3 (preferably using 64bits)?
For a simple simulation in C, I need to generate exponential random variables. I remember reading somewhere (but I can't find it now, and I don't remember why) that using the rand() function to generate random integers in a fixed range would generate non-uniformly distributed integers. Because of this, I'm wondering if this code might have a similar problem:
//generate u ~ U[0,1]
u = ( (double)rand() / ((double)(RAND_MAX));
//inverse of exponential CDF to get exponential random variable
expon = -log(1-u) * mean;
Thank you!
I have a data.frame:
df<-data.frame(a=c("x","x","y","y"),b=c(1,2,3,4))
> df
a b
1 x 1
2 x 2
3 y 3
4 y 4
What's the easiest way to print out each pair of values as a list of strings like this:
"x1", "x2", "y1", "y2"
Hello
I'm tring to generate schema for some type from assembly with xsd.exe
here is command line :
xsd.exe TestAssemby.dll /t:TestType
Here is error I got
Error: There was an error processing 'TestAssemby.dll'.
- Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
I copied referenced dll into folder where is located according to
http://social.msdn.microsoft.com/Forums/en/xmlandnetfx/thread/308e4f3a-e1c3-43f5-b7a6-a82f1395997d
but still get the same error
I have questions :
1) What can be possible reasons of such error ?
2) How should be used LoaderExceptions property ? ( example will be very helpful)
Thanks in advance
The popular PTS (Platform Technology Services) technical trainings for partners now include a workshop on Big Data.
First workshop will take place in Milan on July 10-12. (You can register by clicking the link below)
Oracle Big Data
Technical
Workshop
July
10-12,
2012: Cinisello Balsamo, Milan, Italy
For more info contact [email protected]
I'm developing a SOAP service using JAX-WS and JAXB under Netbeans 6.8, and getting a little frustrated with Netbeans trashing my work every time the XSD schema my JAXB bindings are based upon changes.
To elaborate, the IDE automatically generates classes bound to the schema, which can then be (un)marshalled from/to XML using JAXB. To these classes I've added extra methods to (for example) convert to and from separate classes designed to be persisted to database with JPA. The problem is that whenever the schema changes and I rebuild, these classes are regenerated, and all my custom methods are deleted. I can manually replace them by copy-pasting from a backup file, but that is rather time-consuming and tedious. As I'm using an iterative design approach, the schema is changing rather frequently and I'm wasting an awful lot of time whenever it does, simply to reinstate my previous code.
While the IDE automatically regenerating the JAXB-bound classes is entirely reasonable and I don't mean to imply otherwise, I was wondering if anyone had any bright ideas as to how to prevent my extra work having to be manually reinstated every time my schema changes?
Hi,
I what to create a url that looks like website.com/sea/season/23/team
Here is the MapRoute
routes.MapRoute(
"SeaTeam",
"sea/season/{seasonId}/team/{action}/{name}",
new { controller = "Team", action = "Index", name = UrlParameter.Optional}
);
The Html.ActionLink looks like
@Html.ActionLink("Add Team", "Index", "SeaTeam", new { seasonId = seasons.id }, null)
But its generating the following url
<a href="/SeaTeam?seasonId=1">Add Team</a>
Any insights? Thanks...
My client wants to standardize address information for existing and future addresses collected for their customers, particularly the street suffixes. The application used to enter and collect address information has the street suffix separated from the address field, but it is a textbox instead of a drop down list therefore things are not standardized. I know there are some options out there to standarize data, but they would like a less expensive alternative. Are there any functions in SQL Server that I can use to standardized data?