Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables)
I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table.
I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?
Scala has symbols - names that start with a single quote ' and which are a kind of string constants.
I know symbols from Ruby (where they start with a colon). In Ruby they are used for some meta-programming tasks, like generating getters and setters for member variables (for example attr_reader :name to generate a getter for name).
I haven't seen a lot of use of symbols in Scala code yet. What are practical uses for symbols in Scala?
Is there any way to to setup Rails generating files with tabs instead spaces?
Or maybe is there any way to auto replacing spaces to tabs in gedit?
Cause I really prefered tabs and it's really take some time to replace spaces to tabs in new generated files by Rails.
Thanks in advance!
hi
i am generating random password.
but i want to get phonetic string of the password.
Any idea how can i get phonetic string?
example :
deT3f9y = delta - echo -Tango -
number 3 - fox - number 9 - yankee
Is there a way to force the MVC automatically generated code to follow the conventions you have set in your preferences? For example, I keep all curly braces on the same lines as their declaring class, method, etc, but when generating a controller, it completely disregards my settings. Is there a setting someplace to force the same code generation as other parts of project?
Hey SO,
I've got a pretty noob question for ya. I keep seeing this syntax:
<%= Html.LabelFor(model => model.Email) %>
...and I have no idea what the = means. I thought it was syntax for linq2sql or ado.net entity framework but I'm just using straight ado.net. I don't understand why the VWD used that syntax when generating the Create form.
What does = mean?
I am feeling problem when generating .pdf file from excel2007(.xlsx) file using code like excelWorkBook.ExportAsFixedFormat(paramExportFormat,
paramExportFilePath, paramExportQuality,
true, false, paramMissing, paramMissing, paramOpenAfterPublish,paramMissing);
THe generated pdf having chart image show with border on XP 2003 server
so it cut some other part. Which not come if generated locally on xp system.
Do we have to do something special to have ASP.NET partial classes aware of controls that are declared in our user control's base classes? The partial classes keep generating declarations for controls in the base class which mean the controls in the base class get hidden and are null.
I have been messing with hash functions and functions to generate primes etc.
I had 3 lock-ups in a short period. This was odd since my macbook rarely locks-up and usually only when I run out of memory - which does not happen often.
But in this case, I had three in a row and none since (but I also am not generating as much load as before).
Hi Guys,
I have just updated my nant script to compile my .net framework 4 solution.
And I got the above error while generating commonassemblyinfo.cs in my solution.
I visited msdn website and also added that line :
in my web.config under runtime-configuration.
But that didn't solve my problem.
Can anyone please suggest what am I missing?
I just read a blog post about NHibernate's ability to create a GUID from the system time (Guid.Comb), thus avoiding a good amount of database fragmentation. You could call it the client-side equivalent to the SQL Server Sequential ID.
Is there a way I could use a similar strategy in my Linq-to-Sql project (by generating the Guid in code)?
I am generating large PNG files from a Scala program. Currently, I am doing it the same way I would do it in java. I am creating a new BufferedImage and setting each pixel to the correct color. This works fine, but I am wondering if there are any good libraries for working with images in Scala? I am looking for something like Ruby's RMagick library.
Hi,
I have developed mailserver using postfix. I used mailgraph for generating the daily, weekly, monthly, yearly reports. But I want to make reports of mail which has sender, recipient, subject, etc.
What should I do?
Please help me....
I am trying to think of an elegant way of getting a random subset from a set in F#
Any thoughts on this?
Perhaps this would work: say we have a set of 2x elements and we need to pick a subset of y elements. Then if we could generate an x sized bit random number that contains exactly y 2n powers we effectively have a random mask with y holes in it. We could keep generating new random numbers until we get the first one satisfying this constraint but is there a better way?
When is it a good idea to use PHP_EOL? I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues? Most of the PHP I write is for generating HTML, and I use <br/> instead of actual newlines, so haven't used this constant before.
I noticed that doxygen uses the graphviz library for creating diagrams. Have you ever used graphviz for generating documentation? Is it worth learning the graphviz for documentation purposes outside the scope of doxygen? Or am I better off to sticking with a standard data modeling package like Visio?
I understand the merits of it as a graphing library, but for trying to represent more complex UML (or similar) is it still worth looking into?
Hi volks,
I copied my sources from my lokal dev (everything works fine) to my repository and from there I did a checkout on my remote dev.
Now when I try to build everything I get this error:
devel:/var/www/myproject# ./symfony
doc:build-model
doctrine generating model classes
file+ /tmp/doctrine_schema_48726.yml
Warning:
file_get_contents(/var/www/myproject/lib/model/doctrine//base/BaseAdvert.class.php):
failed to open stream: No such file or
directory in
/var/www/myproject/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php
on line 77
Do you know what the problem could be?
Thx for your answers :)
I want to create a program for generating the series for the given base-n. ,
for example if my input is 2,then series shuould be, 00,01,10,11,etc.,(binary)
if my input is 10,then series shuould be,1,2,3,4,5,etc.,(decimal)
is there any general mechanism to find these numbers so that I can program for base-n.,
Hi,
while(((long)(1000*ratio*((long)clock()-(long)t0))%100)/1000)<Data_Read_Rate);
The above line is generating the following error:
"Syntax Error before < token".
Why is this error coming up?
I use MINGW32 for development(GCC compiler).
Thanks...
I am generating a dynamic HTML table string and displaying inside a div. I am assigning ID and runat server in that string. eg.
string s="<table id='tblAll' runat='server'></table>".
This string is generated on some different page, and its passed as XmlhttpResponseText
I want to apply sorting on this table, It would be great if any one can help me out.
Thanks
I'm looking for the most suitable tool for generating dynamic geographical maps in Java (with styles based on custom business data: colors, labels etc. will be dynamically set). After some searching, only GeoServer (and the underlying GeoTools library) seems to fit.
Although I'm really happy with this solution, I'm afraid I might miss something and make some decision based on incomplete input. Any suggestion ? Any viable alternative to compare against ?
Hello all ,
URL u=new URL("telnet://route-server.exodus.net");
This line is generating :
java.net.MalformedURLException: unknown protocol: telnet
And i encounter similar problems with other URLs that begin with "news://"
These are URLs extracted from ODP , so i dont understand why such exceptions arise..
Given that I am generating an exe application with AssemblyBuilder, how do I set an icon to it?
I think I should be using
System.Reflection.Emit.AssemblyBuilder.DefineUnmanagedResource
Is there an example how to do it?
I am generating XML using Apache Velocity. What is the best (most straight-forward) way to XML-escape the output?
(I saw there is an escape tool, but could not figure out it's dev state. I also think that XML escaping is something that is very likely supported by Velocity directly.)