I need to read the data out of database and then save it in a text file, how can I do that in Ruby? Is there any file management system in Ruby?
Thanks
I i am unable to see the design view of a winform app
Errors are:
One or more errors encountered while
loading the designer. The errors are
listed below. Some errors can be fixed
by rebuilding your project, while
others may require code changes.
The event Click is read-only and
cannot be changed.
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value) at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement
statement) at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Anyone who has developed file upload progress bar with following:
Ajax
Javascript
HTML
C based CGI
I am stuck at one point.
I am not able to read each updated progress bar value from CGI script.
When would I implement IDispose on a class as opposed to a destructor? I read this article, but I'm still missing the point.
My assumption is that if I implement IDispose on an object, I can explicitly 'destruct' it as opposed to waiting for the garbage collector to do it. Is this correct?
Does that mean I should always explicitly call Dispose on an object? What are some common examples of this?
How to use getStartupArgs()
Since 0.9.1 it seems you can read the command line arguments issue #245 with the getStartupArgs() method (documentation)
But I do know how to use it, I've put it in in all the Griffon lifecycle, Controller, Service, and I get the exception
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: []
Caused by: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: [
]
I have big file with utf16le (BOM) encoding.
Is it possible to convert it to usual UTF8 by python?
Something like
file_old = open('old.txt', mode='r', encoding='utf_16_le')
file_new = open('new.txt', mode='w', encoding='utf-8')
text = file_old.read()
file_new.write(text.encode('utf-8'))
http://docs.python.org/release/2.3/lib/node126.html (-- utf_16_le UTF-16LE)
Not working. Can't understand "TypeError: must be str, not bytes" error.
python 3
I need to detect whether the text within a cell is struck out or not. I'm using this:
Cell cc = sheet.getCell("B1");
CellFormat format = cc.getCellFormat();
System.out.println(format.getFont().isStruckout());
but I remember I read somewhere that CellFormat is deprecated and CellFeatures should be used instead. How could one find out whether a text is struck out using CellFeatures?
Hi there!
i just want to ask how to set the textbox so it will display decimal numbers. Couse now if i read a decimal number from my access database like 0,2 it displays only 0
Tnx for the help!
I have a small server problem when working with LAMPP and WAMP server in PHP.I am using LAMPP server for local development and I need to host in WAMP server.When try to read an image from a dynamic created pdf file in LAMPP, it is working perfectly but, the same one not compact able with WAMP server.What will be the problem?Any additional feature need to configure in WAMP.Please help me to go forward.Please........
I would like to list folders from a webserver into a treeview, keeping the hierarchy. It should not go under level 2 (so root - level 1 - level 2). Would this be possible somehow?
If you're interested, I would like to make a list of the Chromium snapshots from here:
http://build.chromium.org/buildbot/snapshots/
into a browse-able treeview (well, I'm making a revision checker, what looks up the revisions, and lets the user select the given build and read it's log from
http://build.chromium.org/buildbot/snapshots/ + releasetype + / + releasenumber / changelog.xml
Summary
JBoss allows clients and servers to authenticate using certificates and ssl. One thing that seems strange is that you are not required to give your hostname on the certificate.
I think that this means if Server B is in your truststore, Sever B can pretend to be any server that they want.
(And likewise: if Client B is in your truststore...)
Am I missing something here?
Authentication Steps
(Summary of Wikipeida Page)
Client Server
=================================================================================================
1) Client sends Client Hello
ENCRIPTION: None
- highest TLS protocol supported
- random number
- list of cipher suites
- compression methods
2) Sever Hello
ENCRIPTION: None
- highest TLS protocol supported
- random number
- choosen cipher suite
- choosen compression method
3) Certificate Message
ENCRIPTION: None
-
4) ServerHelloDone
ENCRIPTION: None
5) Certificate Message
ENCRIPTION: None
6) ClientKeyExchange Message
ENCRIPTION: server's public key => only server can read
=> if sever can read this he must own the certificate
- may contain a PreMasterSecerate, public key or nothing (depends on cipher)
7) CertificateVerify Message
ENCRIPTION: clients private key
- purpose is to prove to the server that client owns the cert
8) BOTH CLIENT AND SERVER:
- use random numbers and PreMasterSecret to compute a common secerate
9) Finished message
- contains a has and MAC over previous handshakes
(to ensure that those unincripted messages did not get broken)
10) Finished message
- samething
Sever Knows
The client has the public key for the sent certificate (step 7)
The client's certificate is valid because either:
it has been signed by a CA (verisign)
it has been self-signed BUT it is in the server's truststore
It is not a replay attack because presumably the random number (step 1 or 2) is sent with each message
Client Knows
The server has the public key for the sent certificate (step 6 with step 8)
The server's certificate is valid
because either:
it has been signed by a CA (verisign)
it has been self-signed BUT it is in the client's truststore
It is not a replay attack because presumably the random number (step 1 or 2)
is sent with each message
Potential Problem
Suppose the client's truststore has certs in it:
Server A
Server B (malicous)
Server A has hostname www.A.com
Server B has hostname www.B.com
Suppose: The client tries to connect to Server A but Server B launches a man in the middle attack.
Since server B:
has a public key for the certificate that will be sent to the client
has a "valid certificate" (a cert in the truststore)
And since:
certificates do not have a hostname feild in them
It seems like Server B can pretend to be Server A easily.
Is there something that I am missing?
I have read a few questions here where people say that PHP is not the 'best' language for web development compared to python, ruby.
What about PHP makes it have such a bad rep?
What is the difference when encrypting GET and POST data? Thx for answer
Edit: i need to write it more specific.
When https-SSL encrypts both of this methods, what is the difference in way browser does this.
Which parts are encrypted and which are not?
I somewhere read, that the destination url is not encrypted in POST, is that true?
If it is true and same in GET, where are all the parameters?
Hi, the idea is to use SVN (Tortoise) but, the thing is I dont have and dont want to use a server, cuz this will be used with only one person, is a college project.
So... I have a computer, an old computer that I could use to make a server, at home, the idea is to use it like a server, so, what documentation should I read, or what should I do to make it happen?...
Thx.
I've read that using a back tick ` should allow for using of reserved words. I'm using SQL Server and Fluent NHibernate and have a column name "File". If I map it with
"`File"
it tries using
[Fil]
so it's adding the brackets correctly, but dropping the "e" from the end. If I map it as
"`Filee"
it uses
[File]
correctly.
Am I doing something wrong or is this a bug in NHibernate or Fluent Nhibernate?
Hello,
I'm trying to start an application using Python. I've seen that some people use startfile but I also read that it only works with Windows. I'm using Mac systems and hoping for it to work with them.
Thanks,
Aaron
I've read through other questions but to no avail - I really can't work this out.
The site is http://bit.ly/cqEO53 (hoping to not have any search links to this page so shortening URL).
The gradient on the footer looks great in non IE browsers, but fails to show in IE 7,8 and the dev preview.
Any ideas?
I have a dropdown menu that works fine, but I would like it so, that if I hover off the menu, it doesn't immediately hide again. So basically I would like a one second delay.
I have read about setTimeout, but not sure if it is what I need?
$('#mainnav a').bind('mouseover', function()
{
$(this).parents('li').children('ul').show();
});
$('#mainnav a').bind('mouseout', function()
{
$(this).parents('li').children('ul').hide();
});
I have several classes that extend C and I would need a method that accepts any argument of type C. But in this method I would like to know if I'm dealing with A or B.
*
public A extends C
public B extends C
public void goForIt(C c)()
If I cast how can I retrieve the type in a clean way (I just read using getClass or instanceof is often not the best way).
PS: Fell free to edit an explicit title.
*Sorry but I can't type closing braces
Hi folks!
I read the german article about "Make" on Wikipedia and found the following 2 lines:
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
Why is the dependency expression left out and why does the target use a double file extension?
this is simple I know, but i don't have internet access and this netcafes keyboard sucks, so if someone can answer this question please.
what would be the class ? just give me a kick in the right direction. there is simple arraylist object that I want to write and read to/ from file.
thanks