Questions tagged [creation]

Do not use. Too vague to be of any possible significance.

Do not use. Too vague to be of any possible significance. Tag should be removed.

462 questions
43
votes
20 answers

Is this Factory Method creation pattern?

I have been using factory method creation pattern for awhile now. I was just recently told that this: public static class ScheduleTypeFactory { public static IScheduleItem GetScheduleItem(ScheduleTypeEnum scheduleType) { …
39
votes
5 answers

How to create div with class

I'm trying to create a div and give him a class but it doesn't work. Could anybody help me? $(document).ready(function() { $('input[type=checkbox]').each(function() { $(this).after($('
', { className: 'test', text: "a…
fteinz
  • 1,023
  • 3
  • 14
  • 26
29
votes
4 answers

JAXB and constructors

I'm starting learning JAXB, so my question can be very silly. Now I have classes and want generate XML Schema. Going after this instruction I get exception IllegalAnnotationExceptions ... does not have a no-arg default constructor. Yeah. My…
Stan Kurilin
  • 14,860
  • 20
  • 75
  • 127
26
votes
3 answers

How to create a dynamic file + link for download in Javascript?

Typically, HTML pages can have link to documents (PDF, etc...) which can be downloaded from the server. Assuming a Javascript enabled webpage, is it possible to dynamically create a text document (for example) from within the user browser and add a…
Jérôme Verstrynge
  • 51,859
  • 84
  • 263
  • 429
25
votes
4 answers

What is happening in Crockford's object creation technique?

There are only 3 lines of code, and yet I'm having trouble fully grasping this: Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; newObject = Object.create(oldObject); (from Prototypal…
Chris Noe
  • 33,647
  • 22
  • 66
  • 90
24
votes
4 answers

Create a txt file using batch file in a specific folder

I am trying to create a batch file which will create a text file in a specific folder. I am able to create a text file on my desktop, but I need to create a file in a specific file path. For example in D:/Testing folder I wants to create a user…
user1926138
  • 1,238
  • 7
  • 25
  • 50
20
votes
7 answers

What is the main difference in object creation between Java and C++?

I'm preparing for an exam in Java and one of the questions which was on a previous exam was:"What is the main difference in object creation between Java and C++?" I think I know the basics of object creation like for example how constructors are…
AndrejaKo
  • 1,691
  • 5
  • 25
  • 40
18
votes
5 answers

Building Self-Referencing Tuples

After seeing a conversation in a forum from many years ago that was never resolved, it caused me to wonder how one would correctly create a tuple that referenced itself. Technically, this is a very bad idea since tuples are supposed to be immutable.…
Noctis Skytower
  • 19,237
  • 15
  • 73
  • 103
17
votes
4 answers

How do I provide a file path in Mac OS X while creating a file in Java?

File f = new File("C:\\Temp\\Example.txt"); f.createNewFile(); On executing, a new file named "Example.txt" will be created in the Temp folder. How do I provide the file path in Mac OS X? I tried providing: File f = new…
Pavan Kumar
  • 193
  • 2
  • 2
  • 7
17
votes
4 answers

Test a file date with bash

I am trying to test how old ago a file was created (in seconds) with bash in an if statement. I need creation date, not modification. Do you have any idea how to do this, without using a command like find with grep?
JeffPHP
  • 261
  • 1
  • 2
  • 9
15
votes
3 answers

HTML5 to PDF serverside

I'm looking for a solution for generating a PDF from an HTML5/CSS3 document, serverside. I know there is plenty of solution for creating a PDF (like FOP, iText...), but I need to make sure it will look 100% the same than the HTML page. So, I don't…
Olivier
  • 804
  • 2
  • 7
  • 12
13
votes
4 answers

How do I create a PHP static class property at runtime (dynamically)?

I'd like to do something like this: public static function createDynamic(){ $mydynamicvar = 'module'; self::$mydynamicvar = $value; } and be able to access the property from within the class with $value = self::$module;
Lucas Batistussi
  • 2,051
  • 2
  • 23
  • 32
12
votes
2 answers

Estimating index creation time in oracle

I have some tables in Oracle enviroment which I have found could benefit from new indexes. However, they are big tables, ranging from 1M registers to 300M registers, so I would first try to estimate how much time it would take for the index creation…
kurast
  • 1,551
  • 3
  • 15
  • 37
11
votes
5 answers

I want to create xlsx (Excel) file from c#

This is a code which could create only create xls file. But I want to create xlsx (Excel) file; how can I do that from this code or else can I have another code which I could use to create xlsx files. using Excel =…
Malinda Peiris
  • 492
  • 1
  • 6
  • 17
10
votes
1 answer

How do you add xml document info with scala.xml?

First of all: I am aware of anti-xml, and scales, but I would like to use standard scala.xml I prefer to build xml document using explicit methods, not with implicit xml syntax built into Scala Ok, so I have such piece of code: val text = new…
greenoldman
  • 15,621
  • 22
  • 103
  • 174
1
2 3
30 31