I need to read the data out of database and then save them in to a txt file, how can i do that in Ruby on rails? is there any file management system in ruby on rails?
Thanks
Im new to C#/.NET . But Ive been doing TDD for quite some time now. I wanted to what is the best framework that can be used for mocking objects while writing tests in c3
I'm trying to build a system where access to certain resources (file shares) in Windows Server, is limited not only by the username (in a Active Directory domain), but also by the client machine. So far, I haven't found a good way to do this; adding the computer account to the DACL is apparently not the way to do it.
Windows Server 2012 supports this with Dynamic Access Control, but this method requires all clients to be Windows 8, it seems, with no way to use this with Windows 7 clients.
Is there a supported way to do this? (or alternatively, add support for device authorization with Windows 7).
Hi folks
The activity monitor in sql2k8 allows us to see the most expensive queries. Ok, that's kewl, but is there a way I can log this info or get this info via query analyser? I don't really want to have the Sql Management console open and me looking at the activity monitor dashboard.
I want to figure out which queries are poorly written/schema is poorly designed, etc.
Thanks heaps for any help!
I read:
Cannot connect to ec2 instance
http://stackoverflow.com/questions/5635640/cannot-ssh-into-amazon-ec2-instance
Amazon EC2 instance ssh problems
etc...
But could not fix it: suddenly (after a year of service, no changes on my winscp settings) it gives me "network error connection timed out" (im using ec2-user) (also from the amazon console).
Log FILE: http://pastebin.com/vNq6YQvN
All Sites that run on it run fine
port 22 is allowed (never changed it) (security group)
using the correct ec2-user and domain
via my winscp / putty i can connect to other hosting (via ssh)
update: SOLVED. I spend 2 days without looking at my own IP address .... (since it did not change the past 3 years....). Your comments made the spark in my brain. thank you so much. (and only now i find dozens of discussions from angry users that the static addresses from my provider are changed to dynamic ones: http://gathering.tweakers.net/forum/list_messages/1501005/12 ...)
I have a VPS server running in the cloud. Fully automated server image upgrade/downgrade(by RAM/HDD plans).
The problem is that server upgrade/downgrade takes time and involves total unavailability during this period(up to 30 minutes).
Goal: during this downtime server my website(http://mydomain.here) from different server with some message like "Under construction".
How can I do this?
--
mydomain.here is hosted on godaddy and uses its DNS(If I call it right). It's pointing with A-record to my VPS's IP address now.
Change in these DNS settings will take more than 30minutes, so it's not an option. How can I find mode "dynamic" DNS? What should I learn?
I really want to share my localhost over the internet to show my friends the progress of the website we're working on, so that I don't need to upload it to the public server each time I make a change.
showoff.io is not free and localtunnel gives me "failed to authenticate" when trying to upload my public key (a lot of people seem to have this problem and there doesn't seem to be a solution for this).
Does anyone know any other free service I can use or any other solution at all? I'm using a Mac.
Thanks.
UPDATE: with localhost I mean a web server running on my computer, I have a dynamic IP address and no I'm not behind a router (just using a wireless modem).
I am getting an error thrown when I launch my Xcode 3.2 all of a sudden:
Uncaught Exception:
* -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0]
I can click through the error and Xcode seems to launch properly. I removed and reinstalled Xcode to no avail, and yet cannot find a config or perference that might be the culprit.
I am running on 10.6.3 fwiw....
Has anyone else run into this problkem?
TIA!
Regards,
Steve O'Sullivan
Where one can learn more about VectorScript (the Pascal-like programming languaged built into NNA VectorWorks CAD application) to create custom "plug-in" objects and tools ?
Hi all,
Just a quick question – my server is running at my house serving www pages at www.javawag.com. The problem is that my home internet connection keeps dropping randomly - for about 10 mins at a time. This is only an intermittent problem and will go away soon I hope. However, my server doesn't recover properly - when the connection comes back, I can still access it at 192.168.0.8 (locally) without any issue, but at www.javawag.com there's no reply!
(Just an aside - my home internet connection is dynamic ISP, the domain www.javawag.com points to javawag.dyndns.org which in turn points to my IP, updated every minute by ddclient on the server)
Is there some way for the server to check if it's accessible from the outside world periodically, and if not restart Apache/reboot? Oh, and if I reboot the problem fixes itself also!
Javawag
I asked this in StackOverflow and was redirected here. Apologies for redundancy.
I have an Excel worksheet with a combo box on Sheet1 that is populated via its Input Range property from a Dynamic Named Range on Sheet2. It works fine and no VBA is required.
My data on Sheet2 is actually in an Excel Table (all data is in the XLS file, no external data sources). For clarity, I wanted to use a structured table reference for the combo box's Input Range, but cannot seem to find a syntax that works, e.g. myTable[[#Data],[myColumn3]]
I cannot find any indications that the combo box WILL accept structured table references, though I cannot see why it wouldn't.
So, two part question: 1. Is is possible to use a table column reference in the combo box input range property (not using VBA) and 2. HOW?
Is there a possibility to create any python object that will be not sortable? So that will be an exception when trying to sort a list of that objects?
I created a very simple class, didn't define any comparison methods, but still instances of this class are comparable and thus sortable. Maybe, my class inherits comparison methods from somewhere. But I don't want this behaviour.
I would like to retreive some binary data from a varbinary(max) column in a SQL Server database for debugging purposes.
What is the easiest way to get this data into a local binary file, preferably without having to write a throw-away console application?
I have tried using SQL Server Management Studio but this returns a hex encoded binary string, rather than raw binary data (even with the "results to file" option).
I am able to load over 200 UIImage objects into a NSMutableDictionary without any memorry warning issues.
When I start displaying them on the screen (after about showing 10-20 images) I get low memory warnings and an eventual crash.
Only about 8 images are displayed at anyone time.
Does it take additional memory to actually draw a UIImage on the screen?
No memory leaks are showing up and i've reviewed code for leaks many many times.
Currently I have created a ABCFactory class that has a single method creating ABC objects. Now that I think of it, maybe instead of having a factory, I could just make a static method in my ABC Method. What are the pro's and con's on making this change? Will it not lead to the same? I don't foresee having other classes inherit ABC, but one never knows!
Thanks
So as a developer I am seeking to improve not only my coding skills but my design and management skills. Because of this I'm starting to pay more attention to software engineering practices but i'm not sure where agile development fits into the picture. I can appreciate agility in projects but I wonder whether this conflicts with the traditional ways of software engineering practices and research.
What's the simplest way of printing an array of primitives or of objects in Java? Here are some example inputs and outputs:
int[] intArray = new int[] {1, 2, 3, 4, 5};
//output: [1, 2, 3, 4, 5]
String[] strArray = new String[] {"John", "Mary", "Bob"};
//output: [John, Mary, Bob]
I am getting an error while trying to resize System Partition for Windows 2003 Server (this is a VM on a Hyper-v Windows Server 2008) using GParted Live CD ISO.
Followed this tutorial:
http://malaysiavm.com/blog/how-to-resize-windows-2003-server-virtual-disk-on-vmware-esx/
and GParted Doc
http://gparted.sourceforge.net/larry/resize/resizing.htm
(They are very similar)
The VM has a Dynamic VHD file, I have already increased it using Hyper-v. GParted doesn't give any clues or details for the error. Just simply errors when trying to grow the partition. Any ideas what I can do? Thanks!
Using version of Gparted: gparted-live-0.13.1-2
In my code, I am using an array xyz of 10 objects. When I am trying to access an element of the array using an unsigned int index like this: xyz[level], I get 'Buffer overrun' warning. Logically, I am pretty sure that level won't exceed 10. How to avoid this warning?
my_event = Event.objects.get(id=4)
current_time = datetime.datetime.now()
How do I do check if my current time is between them?
my_event.start_time < current_time < my_event.end_time
How can I find the size of an abstract class?
class A
{
virtual void PureVirtualFunction() = 0;
};
Since this is an abstract class, I can't create objects of this class. How will I be able to find the size of the abstract class A using the 'sizeof' operator?
I use a desktop with multiple monitors
I have tried F.lux and it is a great app for changing the color from 3500k-6500k... but doesn't adjust screen brightness. (I recommend you try it)
I've googled for hours trying to find an app that will work to let me easily manage screen brightness either by a "dim when idle" or a dynamically updating screen brightness based on the time of day. Windows 7 desktop doesn't seem to have options for me to adjust brightness on the system, and manually changing three separate monitors is too much of a chore?
Anybody have some recommendations? Perhaps a way to script this, knowledge of how to use the supposed dynamic screen brightness functions that Windows was supposed to add in Windows 7?
So if I have a class of which I have a number saved in a datastore, and then seek to add a field later, how can I prevent all my previous objects breaking? Is there a way to retroactively set those fields so they're not null?
As far as I know, should_receive is applied only to mock objects. What I want is to check, if a certain Class (not object) received a certain message, like:
User.should_receive(:all).once
How do I do that?
I have what I would consider a small sized iPhone app that uses SQLite.
There is a singleton domain object which gets data from a SQLite database.
Is it better to create and open the SQLite connection for each request, or to open the DB once and hold on to it for the duration of the app.
The app's reason for being is the domain object so other objects will not need the DB.