I would like to use newId to generate random numbers. Usually tou would use it just once, but I might be generating up to 10 randim numbers per newId.
Is it random enough?
I was psyched about the possibility of using SQLite as a database solution during development so that I could focus on writing the code first and dynamically generating the db at runtime using NHibernate's ShemaExport functionality. However, I'm running into a few issues, not the least of which is that it seems that SQLite requires me to use Int64 for my primary keys (vs, say, Int32 or Guid). Is there any way around this?
Hi everyone
I was wondering how I could start generating temporarily download links based on files from a protected directory (e.g. /downloads/). These links need to be valid until someone used it 5 times or so or after a week or so, after that the link shouldn't be accessible anymore.
Any help would be appreciated.
in PHP Consider this function:
function test($name, $age) {}
I need to somehow extract the parameter names (for generating custom documentations automatically) so that I could do something like:
get_func_argNames('test');
and it would return Array['name','age'] .
Is this even possible in PHP ?
Hi,
Does anyone know if it is possible to encode a video using ffmpeg in reverse? (So the resulting video plays in reverse?)
I think I can by generating images for each frame (so a folder of images labelled 1.jpg, 2.jpg etc), then write a script to change the image names, and then re-encode the ivdeo from these files.
Does anyone know of a quicker way?
This is an FLV video.
Thank you
I'm generating buttons dynamically that I want it to call a method like this:
private function fetchTheDay(day:String):void {
...
}
But I wasn't sure how to make the button pass the string to it
button.addEventListener(MouseEvent.CLICK,fetchTheDay);
buttonVGroup.addElement(button);
trying to do something like this didn't work:
button.addEventListener(MouseEvent.CLICK,fetchTheDay(myString));
How should I do this?
I'm working for a website where i need to sum functionality related to sales
I'm very new to the website stuff and found many things on net but don't knew what to follow.
Can anybody suggest me some good tutorials which i can follow to create my website
The things which i am going to work on as:
saving customer information to data base
using saved customer information, placing order
generating bills and invoices and downloading it in pdf file format
sending mails to customer with those invoice as attachments
Hi,
I recently contacted a web host regarding support for external database access to a Microsoft SQL Server database included in a package they offer. They replied saying that it is only possible with an SSH-tunnel.
Is it possible to connect to a SQL Server database in Visual Studio using an SSH-tunnel? It is important for me to be able to access the database from my local machine (for debugging, generating LINQ classes, editing tables, etc).
Or, how should I go about working with their database?
Not real information:
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Tekkub/.ssh/id_rsa):
ssh.txt
I entered a file name here. Not sure if i should have,
Enter passphrase (empty for no passphrase):
I am stuck here. I type and it doesnt work
I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved MySQL keyword. How do I escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique)
create table if not exists misc_info (
id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL)ENGINE=INNODB;
HI,
I'm new to iphone programming and developing travel application, which retrieve most of it data from remote database.
What is the best way to implement this solution? I thought of generating XML files in server side and getting data via XML files to iPhone app and displaying them...
Is there better implementation to this, thank you in advance?
Waruna.
I've been reading all kinds of tutorials on how to deploy rails apps on heroku from windows.
I've tried installing git, heroku gem, generating ssh keys and setting paths and everything...
I get either public key error (without putty) or fatal no auth found (with putty)...
Hi everyone, I'm trying to find an elegant way in Coffeescript to merge an array of arrays, so that [[1,2,3],[4,5,6],[7,8,9]] == [1,2,3,4,5,6,7,8,9].
As you might imagine, I need this because I'm generating arrays from a function in a "for in" construct and need to concatenate the resulting nested array:
result = (generate_array(x) for x in arr)
Is there an elegant way to handle this? Thanks for any pointers!
When generating specs with :
rails g controller Home index
A spec is generated with the older object.should syntax
require 'spec_helper'
describe HomeController do
describe "GET 'index'" do
it "returns http success" do
get 'index'
response.should be_success
end
end
end
Is it possible to configure the generator to use the expect syntax instead?
Desired output:
require 'spec_helper'
describe HomeController do
describe "GET 'index'" do
it "returns http success" do
get 'index'
expect(response).to be_success
end
end
end
in config/application.rb:
config.generators do |g|
g.test_framework :rspec, fixture: true
g.fixture_replacement :factory_girl, dir: 'spec/factories'
g.view_specs false
g.stylesheets = false
g.javascripts = false
end
I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved mysql keyword. How do i escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique)
create table if not exists misc_info (
id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL)ENGINE=INNODB;
I'm generating code dynamically, currently using String.Format and embedding placeholders - but reformatting the C# code for use as a template is a pain, and I think using a T4 template would be better.
However, the code generation will be happening on a running system, so I need to know that I can safely and legally redistribute the Microsoft T4 Engine with my product.
Anyone else done this? Or know the (legal) answer?
It's kind of hard to explain, but an example of what I'm wanting to accomplish is like this:
Here is some text | image |
that is printed | |
out in a view and ---------
it is wrapped around an
image that is floating and
right aligned.
I thought about generating the layout in html and using a web view, but I need to be able to perform an action when the user clicks on the image. Does anyone have any ideas?
Thanks in advance,
groomsy
In ASP.NET I frequently use Response.Redirect to redirect the end user to another page on my system. I always set the second parameter to true to immediately end the response.
For the life of me, I can't think of a reason why anybody would ever set that parameter to true. What's the point of continuing generating a page when the end user's browser is just going to be redirected to a different page immediately?
Is there a simple way to see if the xsd code generating C# code has a particular column? Or if you can reference a variable column? table.getColumn("column") instead of table.column?
What are some alternative methods to generate 1000 distinct random integers in the range [0,8000] as opposed to the following:
naive method: generating a number and checking if it's already in the array. O(n^2)
linear shuffle: generate sequence 0 to 8000, shuffle, take the first 1000. O(n)
Is there some way to acces the user object from a custom routing class?
I'd like to add a parameter when generating a url, and that parameter is inside the user session, so I need to access it.
The only way I found to access is using the sfContext::getInstance()-getUser(), but it's known to be inefficient.
Thanks!
I am generating an excel file through C# code. the cell Data type I'm giving as "" . Once I give Number instead of String The generated Excel could not open.
How can I change the Datatype of the cell which I generated through the Code?
Thanks in Advance.
I am trying to use Doxygen Automatic link generation to document some enum but it is not generating links for the global types. It only generates links for the types defined in the class. Is there something I am missing. I am using the example provided on the link above. As required, I have documented the file in which the types are defined.
Hi Guys,
I'm building a part of a system where the user can define "views" from a mysql database.
I want some way of generating simple HTML tables/reports from the data, but not just plain output of sql queries- simple joins probably isn't enough.
Any ideas?
I have a table mytable( id, key, value). I realize that key is generating a lot of data redundancy since my key is a string. (my keys are really long, but repetititve) How do I build a separate table out that has (key, keyID) and then alternate my table to be mytable( id, keyID, value) and keyTable(keyID, key) ?