Hi
im using qt , and i parse complex json data structure but i find my self doing to many
loops each time i need to parse this JSON , i wander how or what can be the best way to
handle big JSON structures
I am trying to make 3 rows of 4 buttons each that will take up the entire width of the screen. I have tried Linear Layout but have trouble adding a second row and from what I have read nesting Linear Layouts is bad practice. I tried to use relative layout several times but I cannot manage to get the buttons to fill the width of the screen because it ignores layout_weight, I then tried nesting linear layout in relative layout but layout_weight is still ignored.
What is the best way to accomplish this?
im using this sql query to create an index:
$query = "CREATE INDEX id_index2
ON countries(geoname_id, name)";
but how do i update the index when new entries are added?
should i run a php script with the update query in CRON and run it every night?
is this best practice for automated index updating?
I have found myself doing a lot of work to get nHibernate setup and am left wondering: Why use a framework like Hibernate/NHibernate? I am sure that quite a few people love the framework but I am unclear on the advantages and disadvantages. What are the advantages and disadvantages of lazy loading, and are there other features to Hibernate? Is there anything that makes a framework like this easier to use (best practices, other frameworks, etc)?
Hello everybody,
I have worked a lot with PHP in last times, but I am not sure if it is the best choice for website programming. What language do you prefer for website programming?
Which type (private, business, etc.) of website do you build with that language?
Suppose I have a class
public class Foo
{
public Bar { get; set; }
}
Then I have another class
public class Gloop
{
public List<Foo> Foos { get; set; }
}
What's the easiest way to get a List of Foo.Bars?
I'm using C# 4.0 and can use Linq if that is the best choice.
My first thought was something like
I have found that if I move a message using IMAPIFolder::CopyMessages (using the MESSAGE_MOVE flag) the message gets a new entry ID. However I do not see any reliable way of getting the entry ID of the message in its new location, or otherwise getting a reference to it.
The best suggestion I have had so far involves tagging the message with the old custom property before moving, and then doing a search afterwards, but I was wondering if there is a less convoluted solution.
What is the best way to get HTML programmatically in the view from the controller.
I sometimes use string builder for that to render some html and send it the view from the controller.is it efficient?
What do you people suggests?
Suppose I have:
class myclass:
def __init__(self):
self.foo = "bar"
where the value of foo needs to be available to users of myclass. Is it OK to just read the value of foo directly from an instance of myclass? Should I add a get_foo method to myclass or perhaps add a foo property? What's the best practice here?
Hi,
I am using the JQuery load function to load part of my page. Can I access the variables from that page in the page that loads it. e.g.
Page A uses JQuery load function to load B
Page B loads and sets a variable in context called pageB_var which holds a django object
Page A can then access this variable by doing {{pageB_var}} since it was added to the context
If not what is the best way of doing this?
Thanks
What is the best way to determine whether IIS is installed and the version if it is using MSBuild?
So far I can think of using either WMI or Registry but is there an existing task in the MS Community Task, MS Web Deployment or MSBuild Extension tasks which already does this?
I have a public WCF Service.
I have a WPF Desktop app & a silverlight app. My apps does not have any login requirements.
I want to make it difficult for another developer / website to make use of my service.
What's the best way to restrict access to my service? Use SSL and have the desktop / silverlight app store a token inside of it?
I am building a custom CMS in ASP.NET MVC and one of the requirements is that the content has a start and end date that dictates whether or not the page appears on the site. What is the best approach to this? Should I run some sort of chron job to mark the status of the page according to its publish dates? Does anyone have any resources or advice on the matter?
Say a simple structure
struct abc
{
int a;
char b;
}
I got some value in a variable defined as its structure and now I want to print below
a = [some value]
b = [some character]
What is the best way to achieve this for an arbitrary structure without having to write a dump...(...) function for each of the structure I encounter?
What is currently the best way to code a (semi complicated) website that uses html, css, javascript and some server stuff (php?)? Would you code most of it by hand, use a visual editor for certains parts, are there standard quality editors nowadays? How do web developers go about doing this?
I am writing a Pylons-based download gateway. The gateway's client will address files by ID:
/file_gw/download/1
Internally, the file itself is accessed via HTTP from an internal file server:
http://internal-srv/path/to/file_1.content
The files may be quite large, so I want to stream the content. I store metadata about the file in a StoredFile model object:
class StoredFile(Base):
id = Column(Integer, primary_key=True)
name = Column(String)
size = Column(Integer)
content_type = Column(String)
url = Column(String)
Given this, what's the best (ie: most architecturally-sound, performant, et al) way to write my file_gw controller?
I need to gather a list of items associated with another item from my user in a ASP.NET MVC project. I would like to have a controller action like bellow.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(int x, int y, IEnumerable<int> zKeys)
{
//Do stuff here
}
How can I setup my form to pass data in this way? If data of this particular form can't be provided, what's the next best way to pass this type of information in ASP.NET MVC?
I have a simple Blog model with a TextFields.
What is the best way to save link ?
1) Saving link in the database in this form: http://www.example.com
and then using some filter in the template to trasform it in form:
<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>
2) Saving link in the database directly in this form:
<a rel="nofollow" href="http://www.example.com>http://www.example.com</a>
I have a bunch of 200X120 thumbnails and a bunch of high quality images, Apparently when I just resize the thumbnails with img size the quality suffers, so we are loading two images from the server the image thumbnail and the actual, I am just trying to optimize my site for speed a little saw someone mention embedding thumbs in the image, does anyone know a program that does that? Is this the best way to achieve my goal of high quality thumbnails?
I am trying to translate the following:
Action:
pushl %ebp
movl %esp, %eax
subl $32, %esp
movl $0, -8(%eax)
movl $0, -4(%eax)
movl -4(%eax), %eax
cmpl 32(%eax), %ebp
movl -4(%ebp), %eax
sall $2, %ebp
addl 8(%ebp), %ebp
movl (%ebp), %ebp
addl %ebp, -8(%eax)
addl $1, -4(%eax)
What is the best way to learn assembly and translating this code?
I need to encrypt and decrypt a querystring in ASP.NET.
The querystring might look something like this:
http://www.mysite.com/report.aspx?id=12345&year=2008
How do I go about encrypting the entire querystring so that it looks something like the following?
http://www.mysite.com/report.aspx?crypt=asldjfaf32as98df8a
And then, of course, how to I decrypt it? What's the best encryption to use for something like this? TripleDES?
I am looking for a PHP example/tutorial which can accept hi-scores/survey upload from an iPhone. Hopefully, the PHP script:
accepts POST, in additional to GET
works over SSL (https)
connects to MySQL
In addition, it'd best the iPhone can get a session from the server and submit the session value along with the hi-score. Thanks
If I'm building a library in ruby, what's the best way to allow users of the library to set module-wide settings that will be available to all sub classes etc of the library?
A good example would be if I'm writing a library for posting to a webservice:
TheService::File.upload("myfile.txt") # Uploads anonymously
TheService::Settings.login("myuser","mypass") # Or any other similar way of doing this
TheService::File.upload("myfile.txt") # Uploads as 'myuser'
The idea would be that unless TheService::Settings.logout is called then all TheService operations would be conducted under myuser's account.
Any ideas?
Possible Duplicate:
The Definitive C++ Book Guide and List
What is the best text book a beginner (non-CS major) can buy to master C++? And for Java?
Thanks