hi
need signature sample on Windows-Mobile (paint)
how to draw on Windows-Mobile on screen - and savethe Picture ?
can i get sample code (C#) ?
thank's in advance
Hey guys, i've this theme of the week script, easy, just post like normally, save in database and echo it in a column.
But since its theme of the week, i would like it to automatically renew the value to say "none" or "not set" after a week. I know cron jobs could do this but is there another way? [Running in PHP]
What I want to do is pretty simple:
f=Foobar.objects.get(id=1)
foo='somefield'
bar='somevalue'
f.foo=bar
f.save()
This doesn't work as it tries to update the f object's 'foo' field, which of course doesn't exist. How can I accomplish this?
I want to write an windows application in c#.net in which I have to save hindi language fonts to the databases and reading them straight away.I have searched lots of websites and read about localization but couldn't make it through.Please help me.
Thanks
I'm very newbie in ruby and need your help.
I must save a "Topic" and make it like this :
@topic = Topic.new(params[:topic])
But I would like to pass an other information to this topic. It has a field "community_id" that link it to a community.
The logged user has this information on his table.
How can I pass the "community_id" from the logged user to the "community_id" of the "topic" created ?
thx for your help
I am using C#, Entity Framework and SQL Server 2008 Express.
I am connected to the database over internet.
What is the best method to speed up saving/updating data to database?
It takes 60 seconds to save 140 records to database.
I am using c# .net windows form application.
i have to save few inputs in defaultsetting.xml file but if there is invalid file with same file name "defaultsetting.xml" i should show msg in the status bar.. How can I do this?
Is is bad practice to pass the Context to a constructor and save it as a private variable for internal use? The other option is to pass the Context as a parameter to methods that need it.
Which is the better option?
I have a feeling that passing to the constructor might result in memory leaks accidentally.
I have a flash application (a game) and it needs to pass data to a php page to savethe user, and the user's score. However I don't want the user to be able to alter the score him/herself or to initial a scoring without using the application.
What is the best way to do this?
I am currently designing a solution to a problem I have. I need to dynamically generate an XML file on the fly using Java objects, in the same way JAXB generates Java classes from XML files, however the opposite direction. Is there something out there already like this?
Alternatively, a way in which one could 'save' a state of java classes.
The goal I am working towards is a dynamically changing GUI, where a user can redesign their GUI in the same way you can with iGoogle.
i am a newbie of nginx , and i am using nginx as a comet server by nginx_http_push_module
i have two question:
1,how can i savethe messages which recieved by nginx_http_push_module into databases ?
2,how can i get listeners list of a channel ?
thanks~
i tried to find a built-in for geometric mean but couldn't.
(Obviously a built-in isn't going to save me any time while working in the shell, nor do i suspect there's any difference in accuracy; for scripts i try to use built-ins as often as possible, where the (cumulative) performance gain is often noticeable.
In case there isn't one (which i doubt is the case) here's mine.
gm_mean = function(a){prod(a)^(1/length(a))}
Hi there!
Right now I'm logging some info of the user in my web app in a log file to observe the usage & interest for some services, but I'm interested in checking that info in a readeable way, so I'm questioning if maybe I shall save that info in a database and then retrieve it to show it in tables or whatever.
It's better to log in the database for my purposes? Or logging like now I could select/order the info of the log easily?
We are building our internal library of components up, and was wondering what everybody has in their library of reusable components for your organization, for desktop applications.
Our list currently includes only a couple of components:
Logon, Security and User Group functionality
System Tray / Service Framework
Component for Internet Communications (to handle proxies, security, etc...)
Billing
What else do you have, that we should add to our list?
If you have reusable web components, save your answers... I will open a different question if this one is successful.
Would a hashtable/hashmap use a lot of memory if it only consists of object references and int's?
As for a school project we had to map a database to objects (that's what being done by orm/hibernate nowadays) but eager to find a good way not to store id's in objects in order to save them again we thought of putting all objects we created in a hashmap/hashtable, so we could easily retrieve it's ID. My question is if it would cost me performance using this, in my opinion more elegant way to solve this problem.
How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one?
Thanks.
How can I ensure that my custom field's *to_python()* method is only called when the data in the field has been loaded from the DB?
I'm trying to use a Custom Field to handle the Base64 Encoding/Decoding of a single model property. Everything appeared to be working correctly until I instantiated a new instance of the model and set this property with its plaintext value...at that point, Django tried to decode the field but failed because it was plaintext.
The allure of the Custom Field implementation was that I thought I could handle 100% of the encoding/decoding logic there, so that no other part of my code ever needed to know about it. What am I doing wrong?
(NOTE: This is just an example to illustrate my problem, I don't need advice on how I should or should not be using Base64 Encoding)
def encode(value):
return base64.b64encode(value)
def decode(value):
return base64.b64decode(value)
class EncodedField(models.CharField):
__metaclass__ = models.SubfieldBase
def __init__(self, max_length, *args, **kwargs):
super(EncodedField, self).__init__(*args, **kwargs)
def get_prep_value(self, value):
return encode(value)
def to_python(self, value):
return decode(value)
class Person(models.Model):
internal_id = EncodedField(max_length=32)
...and it breaks when I do this in the interactive shell. Why is it calling to_python() here?
>>> from myapp.models import *
>>> Person(internal_id="foo")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 330, in __init__
setattr(self, field.attname, val)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/fields/subclassing.py", line 98, in __set__
obj.__dict__[self.field.name] = self.field.to_python(value)
File "../myapp/models.py", line 87, in to_python
return decode(value)
File "../myapp/models.py", line 74, in decode
return base64.b64decode(value)
File "/usr/lib/python2.6/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding
I had expected I would be able to do something like this...
>>> from myapp.models import *
>>> obj = Person(internal_id="foo")
>>> obj.internal_id
'foo'
>>> obj.save()
>>> newObj = Person.objects.get(internal_id="foo")
>>> newObj.internal_id
'foo'
>>> newObj.internal_id = "bar"
>>> newObj.internal_id
'bar'
>>> newObj.save()
...what am I doing wrong?
I have seen many websites triggering a file save-as dialog on a page with existing HTML content. How do they do this?
I know about setting the right headers such as Content-disposition etc. but when I do that, the content of the page does not load, and immediately the file download is triggered...
I would like to save a file downloaded from the internet in iPhone.
Can I use the url as the file name? If not, what transformation should I apply to the url to obtain a valid file name?
I need to find the local copy of the file later using its url.
So I have a Linux program that runs in a while(true) loop, which waits for user input, process it and print result to stdout.
I want to write a shell script that open this program, feed it lines from a txt file, one line at a time and savethe program output for each line to a file.
So I want to know if there is any command for:
- open a program
- send text to a process
- receive output from that program
Many thanks.
I'd like to have a DropDownList that has a CheckBox next to each item that would allow multiple to be selected. I did a little poking around but haven't found anything that will do this, does anyone know if this can be easily achieved?
I know it can be done with a listBox, but would prefer the dropdown format to save space.
My executable needs zlib1.dll to run,
and I need to keep them together now and then.
How can I merge it into the executable to savethe trouble?
I'm using cmake to build the executable.
Not real information:
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to savethe 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
So.. this never crossed my head before but now I just can't figure out how to do that !!
I want to verify that the object I created was really created, and return True or False according to that :
obj = object(name='plop')
try:
obj.save()
return True
except ???:
return False
Any idea ?
Cheers,
-M